package com.ktjy.service;

import com.ktjy.entity.Supplier;
import com.ktjy.mapper.SupplierMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("supplierService")
public class SupplierServiceImpl implements SupplierService {
    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public List<Supplier> getSupplierList(String supName) {
        return supplierMapper.getSupplierList(supName);
    }

    @Transactional
    @Override
    public int updateSupplierZhujie(Supplier supplier) {
        return supplierMapper.updateSupplierZhujie(supplier);
    }

    @Transactional
    @Override
    public int deleteSupplierZhujie(int id) {
        return supplierMapper.deleteSupplierZhujie(id);
    }
}
